package com.zxx.xin.shorthand.database.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Transient;

/**
 * Created by xin on 2018/3/17.
 */

@Entity
public class Daily implements Parcelable {

    @Id(autoincrement = true)
    private Long id;

    @Property(nameInDb = "title")
    private String mTitle;

    @Property(nameInDb = "content")
    private String mContent;

    @Property(nameInDb = "create_time")
    private Long mCreateTime;

    @Property
    private String mBgBitmap;

    protected Daily(Parcel in) {
        id = in.readLong();
        mTitle = in.readString();
        mContent = in.readString();
        mCreateTime = in.readLong();
        mBgBitmap = in.readString();
    }

    @Transient
    public static final Creator<Daily> CREATOR = new Creator<Daily>() {
        @Override
        public Daily createFromParcel(Parcel in) {
            return new Daily(in);
        }

        @Override
        public Daily[] newArray(int size) {
            return new Daily[size];
        }
    };

    public Long getMCreateTime() {
        return this.mCreateTime;
    }

    public void setMCreateTime(Long mCreateTime) {
        this.mCreateTime = mCreateTime;
    }

    public String getMContent() {
        return this.mContent;
    }

    public void setMContent(String mContent) {
        this.mContent = mContent;
    }

    public String getMTitle() {
        return this.mTitle;
    }

    public void setMTitle(String mTitle) {
        this.mTitle = mTitle;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getmBgBitmap() {
        return mBgBitmap;
    }

    public void setmBgBitmap(String mBgBitmap) {
        this.mBgBitmap = mBgBitmap;
    }

    @Generated(hash = 1810331158)
    public Daily(Long id, String mTitle, String mContent, Long mCreateTime, String mBgBitmap) {
        this.id = id;
        this.mTitle = mTitle;
        this.mContent = mContent;
        this.mCreateTime = mCreateTime;
        this.mBgBitmap = mBgBitmap;
    }

    @Generated(hash = 2135515054)
    public Daily() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeString(mTitle);
        dest.writeString(mContent);
        dest.writeLong(mCreateTime);
        dest.writeString(mBgBitmap);
    }

    public String getMBgBitmap() {
        return this.mBgBitmap;
    }

    public void setMBgBitmap(String mBgBitmap) {
        this.mBgBitmap = mBgBitmap;
    }
}
